---
import { LuBug, LuSparkles, LuTriangleAlert } from "react-icons/lu";
import { ADS_SLOTS, extendedNightlyDownloadLinks } from "~/collections/app";
import Ads from "~/components/ads/Ads.astro";
import RootLayout from "~/layouts/RootLayout.astro";
import DownloadItems from "~/modules/downloads/download-item.astro";
---

<RootLayout>
  <section class="p-4 md:p-16">
    <h2 class="h2 flex items-center gap-4">
      Nightly Downloads
      <LuSparkles className="inline" size={30} />
    </h2>
    <br /><br />
    <aside class="preset-tonal-warning rounded-xl">
      <div class="h3 pl-4 pt-4">
        <LuTriangleAlert className="text-warning-500" />
      </div>
      <div class="p-4">
        <h3 class="h3">
          Nightly versions may contain bugs <LuBug className="inline" />
        </h3>
        <p>
          Although Nightly versions are packed with newest and greatest
          features, it's often unstable and not tested by the maintainers and
          publisher(s).
          <br />
          <span class="text-error-500 underline decoration-dotted">
            So use it at your own risk.
          </span>
          <span>
            Go to <a href="/downloads" class="anchor">Downloads</a> for more stable
            releases.
          </span>
        </p>
      </div>
    </aside>
    <br />

    <p class="mb-4">Following are the new v5 Nightly versions:</p>
    <DownloadItems links={extendedNightlyDownloadLinks} />

    <br />
    <Ads adSlot={ADS_SLOTS.downloadPageDisplay} adFormat="auto" />
    <br />
  </section>
</RootLayout>
